home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / Ex_Right.dxr / 00039.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  729 b   |  23 lines

  1. on enterFrame
  2.   global a, b, c
  3.   set b to random(200) + 3
  4.   put b into field "B"
  5.   set a to integer(b + random(100) + (a / 10))
  6.   put a into field "A"
  7.   put a * a into field "A2"
  8.   put b * b into field "B2"
  9.   put integer((a * a) + (b * b)) into field "C2"
  10.   set the floatPrecision to 2
  11.   set c to float(sqrt(float(a * a) + float(b * b)))
  12.   put c into field "C"
  13.   put " " into field "Answer"
  14.   set the textSize of field "Answer" to 32
  15.   set the textSize of field "A" to 32
  16.   set the textSize of field "B" to 32
  17.   set the textSize of field "C" to 32
  18.   set the textStyle of field "Answer" to "bold"
  19.   set the textStyle of field "A" to "bold"
  20.   set the textStyle of field "B" to "bold"
  21.   set the textStyle of field "C" to "bold"
  22. end
  23.